package com.zlzxm.shoesmarket.view.adapter;

import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.zlzxm.shoesmarket.R;
import com.zlzxm.shoesmarket.view.adapter.entity.EntityClubNote;

import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import java.util.List;

/**
 * Created by zlz
 * on  4/8/21
 */
public class ADClubNote extends BaseQuickAdapter<EntityClubNote, BaseViewHolder> {
    public ADClubNote(@Nullable List<EntityClubNote> data) {
        super(R.layout.item_club_note, data);
    }

    @Override
    protected void convert(@NotNull BaseViewHolder holder, EntityClubNote entity) {

        holder.setText(R.id.tvUserName,entity.getUserName());
        holder.setText(R.id.tvTime,entity.getTime());
        holder.setText(R.id.tvTitle,entity.getTitle());

        Glide.with(getContext())
                .load(entity.getFaceUrl())
                .centerCrop()
                .into((ImageView) holder.getView(R.id.ivFace));


        Glide.with(getContext())
                .load(entity.getUserFaceUrl())
                .circleCrop()
                .into((ImageView) holder.getView(R.id.ivUserFace));

    }
}
